import React, {Component} from 'react'
import PropTypes from 'prop-types'
import './style.less'
import logo from '@/static/img/logo.png';
import user from '@/static/img/user.png';

const left = <div className="iconfont icon-arrow-lift"></div>
const leftImg = <img className="left-img" src={logo} alt=""/>
const rightImg = <img className="right-img" src={user} alt=""/>

class Header extends Component {
    static propTypes = {
        title: PropTypes.string.isRequired,
    }
    render() {
        return (
            <header className="header-container">
                <div className="header-left">{this.props.leftContent==='logo'?leftImg:left}</div>
                <div className="header-title">{this.props.title}</div>
                <div className="header-right">{this.props.rightContent?this.props.rightContent:rightImg}</div>
            </header>
        )
    }
}

export default Header;